<template>
    <div v-show="show" @touchmove.prevent @mousewheel.prevent>
      <div class="loading-area icon-ball" ></div>
    </div>
</template>

<script>
export default {
  data(){
    return{
      show: false
    }
  }
};
</script>

<style lang="less" scoped>
.loading-area {
  position: fixed;
  top: 0;
  left: 0;
  right:0;
  bottom: 0;
  margin: -50px 0 0 -40px;
  text-align: center;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  
}

.icon-ball:before,
.icon-ball:after {
  content: "";
  position: absolute;
  display: inline-block;
  top: 50%;
  left: 50%;
  margin-left: -13px;
  margin-top: -13px;
  width: 26px;
  height: 26px;
  border: 1px solid #999;
  border-radius: 50%;
  box-sizing: border-box;
  background-color: #999;
  animation: loading 1.8s linear alternate infinite;
}

.icon-ball:after {
  top: 70px;
  animation-name: another-loading;
  border-color: red;
  background-color: red;
}

@keyframes loading {
  0% {
    top: 40%;
  }
  100% {
    top: 60%;
  }
}

@keyframes another-loading {
  0% {
    top: 60%;
  }
  100% {
    top: 40%;
  }
}
</style>